#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"

void InsertSortTest()
{
	int a[] = { 3,6,4,2,-1,1,5,6,-1,7,8,9 };
	InsertSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void ShellSortTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	ShellSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void SelectSortTest()
{
	int a[] = { 3,6,4,2,1,5,0,7,8,9 };
	SelectSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void HeapSortTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	HeapSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void BubbleSortTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	BubbleSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void QuickSortTest()
{
	int a[] = { 3,6,-19,2,1,5,-1,-7,8,9 };
	QuickSort(a,0, sizeof(a) / sizeof(a[0])-1);
	Print(a, sizeof(a) / sizeof(a[0]));
}

void QuickSort_NonRTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	QuickSort_NonR(a, 0, sizeof(a) / sizeof(a[0]) - 1);
	Print(a, sizeof(a) / sizeof(a[0]));
}

void MergeSortTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	MergeSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void MergeSortNonRTest()
{
	int a[] = { 3,6,4,2,1,5,-1,7,8,9 };
	MergeSortNonR(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}

void CountSortTest()
{
	int a[] = { 9,8,-17,-6,-6,4,3,2,1,-1,0 };
	CountSort(a, sizeof(a) / sizeof(a[0]));
	Print(a, sizeof(a) / sizeof(a[0]));
}


int main()
{
	//InsertSortTest();
	//ShellSortTest();
	//BubbleSortTest();
	//QuickSort_NonRTest();
	//HeapSortTest();
	//SelectSortTest();
	//MergeSortTest();	
	//QuickSortTest();
	//MergeSortNonRTest();
	CountSortTest();
	return 0;
}